package com.tcxhb.job.dao.dataobject;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.tcxhb.job.dao.handler.biz.JobParamsHandler;
import com.tcxhb.job.dao.handler.biz.RunStrategyHandler;
import com.tcxhb.job.common.model.job.JobParams;
import com.tcxhb.job.common.model.job.RunStrategy;
import lombok.Data;

import java.util.Date;

/**
 * author:auto.generator
 * time: 2023-11-05
 */

@TableName(value = "tc_job_instance", autoResultMap = true)
@Data
public class JobInstanceDO extends BaseDO {
    /**
     * *应用
     **/
    private String appName;

    /**
     * *任务，主键ID
     **/
    private Long jobId;
    /**
     * 唯一ID
     */
    private String traceId;

    /**
     * *客户端地址
     **/
    private String machineAddr;
    /**
     * *执行器任务参数
     **/
    @TableField(typeHandler = JobParamsHandler.class)
    private JobParams jobParams;

    @TableField(typeHandler = RunStrategyHandler.class)
    private RunStrategy runStrategy;

    /**
     * *调度-时间
     **/
    private Long scheduleTime;

    /**
     * *调度-结果
     **/
    private Integer scheduleStatus;


    /**
     * *执行-时间
     **/
    private Date executeTime;

    /**
     * *执行-状态
     **/
    private Integer executeStatus;


    private String msg;

    /**
     * *失败重试次数
     **/
    private Integer failCount;
    /**
     * 是否下次需要重试
     */
    private Integer retryFlag;
}
